package il.ac.biu.cs.grossmm.api.server;

/**
 * If a server component or a service implements this interface, then the
 * framework will call <tt>dispose</tt> when object is no longer in use. Use
 * this method instead of <tt>finalize</tt> to release resources (JVM does not
 * even guarantee that <tt>finalize</tt> will be invoked)
 */
public interface Disposable {
	/**
	 * Releases all resources used by this object
	 * 
	 * @param e
	 *            the exception which caused object disposal, null if disposal
	 *            is a result of normal release of resources
	 */
	void dispose(Exception e);
}
